Add some forgotten accessors for GdkDragContext
authorMatthias Clasen <mclasen@redhat.com>
Fri, 10 Dec 2010 05:58:33 +0000 (00:58 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 10 Dec 2010 05:58:33 +0000 (00:58 -0500)
These fields are accessed in gtk.

gdk/gdk.symbols
gdk/gdkdnd.c
gdk/gdkdnd.h

index 4479b6fa8ad534080f0326541a1c31732d7a23e0..df8cff676e7150d6528c2d13122150877e231839 100644 (file)
@@ -135,7 +135,9 @@ gdk_drag_abort
 gdk_drag_action_get_type G_GNUC_CONST
 gdk_drag_begin
 gdk_drag_context_get_actions
+gdk_drag_context_get_dest_window
 gdk_drag_context_get_device
+gdk_drag_context_get_protocol
 gdk_drag_context_get_selected_action
 gdk_drag_context_get_source_window
 gdk_drag_context_get_suggested_action
index cccae0968a5a727a7929b3eff6f54cac9aeddf57..22967adc10fc8a094698673882ae1197398b08ee 100644 (file)
@@ -185,3 +185,40 @@ gdk_drag_context_get_source_window (GdkDragContext *context)
 
   return context->source_window;
 }
+
+/**
+ * gdk_drag_context_get_dest_window:
+ * @context: a #GdkDragContext
+ *
+ * Returns the destination windw for the DND operation.
+ *
+ * Return value: (transfer none): a #GdkWindow
+ *
+ * Since: 3.0
+ **/
+GdkWindow *
+gdk_drag_context_get_dest_window (GdkDragContext *context)
+{
+  g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), NULL);
+
+  return context->dest_window;
+}
+
+/**
+ * gdk_drag_context_get_protocol:
+ * @context: a #GdkDragContext
+ *
+ * Returns the drag protocol thats used by this context.
+ *
+ * Returns: the drag protocol
+ *
+ * Since: 3.0
+ */
+GdkDragProtocol
+gdk_drag_context_get_protocol (GdkDragContext *context)
+{
+  g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), GDK_DRAG_PROTO_NONE);
+
+  return context->protocol;
+}
+
index b257d1e8f0c87e9d12d3da122d79752c8fdd5352..e383c957e2755cc4caaec8085c427d987f9f852b 100644 (file)
@@ -146,6 +146,8 @@ GdkDragAction    gdk_drag_context_get_suggested_action (GdkDragContext *context)
 GdkDragAction    gdk_drag_context_get_selected_action  (GdkDragContext *context);
 
 GdkWindow       *gdk_drag_context_get_source_window    (GdkDragContext *context);
+GdkWindow       *gdk_drag_context_get_dest_window      (GdkDragContext *context);
+GdkDragProtocol  gdk_drag_context_get_protocol         (GdkDragContext *context);
 
 /* Destination side */